<html>

<head>
<title>Command-line Options</title>
<meta content="HelpMaker.net" name="generator">
<meta content="Command line,Options,Customization,Portable Python,PYTHONDLLPATH" name="keywords">
</head>

<body bgcolor="#FFFCEA">

<table bgcolor="#C0C0C0" border="0" cellpadding="2" cellspacing="0" width="100%">
	<tr>
		<td align="left">
		<div align="left">
			<font color="#010101" face="Arial" size="4">
			<span style="font-size: 14pt; font-family: Arial; color: #010101">Command-line 
			Options</span></font></div>
		</td>
		<td align="right"><font face="Arial" size="2">
		<a href="importexportsettings.htm">Previous</a>&nbsp;<a href="pyscripter.htm">Top</a>&nbsp;<a href="startup-python-scripts.htm">Next</a>
		</font></td>
	</tr>
</table>
<hr>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">When invoked 
	without any arguments PyScripter will load the latest version of Python and 
	restore the files which were open when the last editing session ended.&nbsp; 
	If no files were open an empty Python module is created.&nbsp;&nbsp; This behavior 
	can be changed with command-line arguments:</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><br>
	</span></font></div>
<div align="center">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000"><i>PyScripter 
	[--pythonversion] filename1 filename2 ...</i></span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><br>where</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pythonversion 
	can be PYTHON23, PYTHON24 etc.</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><br>
	</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">if pythonversion 
	is provided on the command-line PyScripter tries to use that version if it is 
	available and PyScripter has been compiled for a version lower to or equal to 
	that version.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">If one or 
	more filenames are provided on the command-line they are opened when PyScripter 
	starts.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">To open a 
	file at a specific line and column use &quot;filename (lll:ccc)&quot;, i.e. 
	the filename should be followed by a space and enclosed in parentheses the line 
	and column numbers separated by colon. The whole expression should be enclosed 
	in double quotes.&nbsp; The expression in double quotes should match the regular 
	expression (.+) \((\d+):(\d+)\)$</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><b>Other command 
	line flags:</b></span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">--PROJECT 
	filename</span></font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">Open a specific 
	PyScripter project file </span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><i>--PYTHONDLLPATH</i></span></font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">In order to 
	allow PyScripter to work with unregistered version of Python such as </span>
	</font><a href="http://www.portablepython.com/">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><u>Portable 
	Python</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">,&nbsp; 
	another command line argument is provided PYTHONDLLPATH. When such an argument 
	is provided the registry search is bypassed and the Python DLL found in that 
	path is used instead.&nbsp; </span></font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
</div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">e.g.&nbsp; 
	PyScripter --PYTHON25 --PYTHONPATHDLL &quot;E:\PortablePython&quot; </span>
	</font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
</div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">See </span>
	</font><a href="unregisteredpython.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Using PyScripter 
	with Unregistered Python</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101"> 
	for more information</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">--NEWINSTANCE 
	or -N</span></font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">If set a new 
	instance of Pyscripter is started.&nbsp; This to prevent the default behavior 
	which is to activate an existing instance of PyScripter is one is running.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><b><u>NOTE</u></b></span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">Since version 
	1.85 PyScripter options are marked with two dashes &quot;--&quot;.</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><br>
	</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><b><u>Further 
	information on --PYTHONDLLPATH</u></b></span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><br>There 
	are two types of Python installation</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">a)&nbsp; For 
	all users</span></font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">Python creates 
	registry entries at HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.x&nbsp; 
	with installation info and puts the dll in
	<a href="file:///c:/Windows/System32">c:\Windows\System32</a>. (<em>This is 
	no longer the case since python version 3.5</em>)</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">b)&nbsp; For 
	a single user</span></font></div>
<div align="left" style="margin-left: 13mm; margin-right: 0mm; text-indent: 0mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">Python creates 
	registry entries at HKEY_CURRENT_USER\SOFTWARE\Python\PythonCore\2.x&nbsp; with 
	installation info and does not put the dll in c:\Windows\System32.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">PyScripter 
	without any command line flags looks at the registry to find the latest version 
	of Python and then for an all user installation tries to load the relevant Python 
	dll from the system path.&nbsp; For a single user installation tries to load 
	the DLL from the Install path that is in the registry.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">When PyScripter 
	is used with a --PYTHONxx flag then it does the above but searching only for 
	the specific version. The Registry lookup does not take place when Python is 
	used with the --PYTHONDLLPATH.&nbsp; Instead PyScripter tries to load the Python 
	dll from the specified path.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">The --PYTHONDLLPATH 
	flag should be used with the --PYTHONxx flag.&nbsp; See</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"> 
	help topic</span></font><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">
	</span></font><a href="unregisteredpython.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Using PyScripter 
	with Unregistered Python</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101"> 
	for an example of using PyScripter with portable Python.</span></font></div>
<div align="left">
</div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">The %PYTHONHOME% 
	environment variable is not used by PyScripter directly but by Python to find 
	the installed libraries.&nbsp; See the Python documentation for its use.
	</span></font></div>

</body>

</html>
